package com.szrt.java.day20170113.demo07;

/**
 * 适配器 媒人
 * 
 * 1：实现电脑的接口
 * 2：和键盘组合
 * @author zsrt
 *
 */
public class Adapter implements USB{

	private KeyBoard keyboard;
	private Mouse mouse;
	private Phone phone;
	
	public Adapter(KeyBoard keyboard,Mouse mouse,Phone phone) {
		this.keyboard = keyboard;
		this.mouse = mouse;
		this.phone = phone;
	}

	@Override
	public void connection() {
		keyboard.print();
		mouse.move();
		phone.charge();
	}

	
	
}
